<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>选课</title>
<!-- # 在线css样式表 # 在线js脚本控制-->
    <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
{% if message!=''%}
<script type="text/javascript">
    var showmessage = '{{ message|tojson }}';
    alert(showmessage)

</script>
{%else%}

{%endif -%}
<div align="center">
  选课信息
</div>
<form id="form1" name="form1" method="post" action="/lxkaddclass">
    <label>学号：{{id}}
        <input type="hidden" name="stu_id" value="{{id}}"/>
    </label>
    <div class="container">
        <div class = "col-sm-12 col-sm-offset-2">

            <table border="1">
                <tr>
                    {% for a in fields -%}
                    <td align="center">{{a}}</td>
                    {%endfor -%}
                    <td>选课</td>
                </tr>
                {%for item in datas%}
                <tr>
                    {%for a in item%}
                    <td align="center">{{a}}</td>
                    {%endfor -%}
                    <td><p><input type="checkbox" name="{{item[0]}}+{{item[1]}}" value="{{item[1]}}" /></p></td>
                </tr>
                {%endfor -%}
            </table>
            <p>
                <div class="form-group">
                    <div class="col-sm-offset-3 col-sm-1">
                        <input class="form-control" type="submit" name="button" value="提交"/>
<!--                        <input class="form-control" type="reset" name="button" value="重置"/>-->
                    </div>
                </div>
            </p>
        </div>
    </div>
</form>

</body>
</html>